<template>
  <div class="topNav">
    <div class="logo">
      <img src="~/static/index/logo-text.png" alt="" class="logo-img">
    </div>
    <div class="nav">
      <div class="nav-item"><a href="#index">首页</a></div>
      <div class="nav-item"><a @click="goAnchor('#product')">产品中心</a></div>
      <div class="nav-item"><a href="#case">案例中心</a></div>
      <div class="nav-item">厚德系统</div>
      <div class="nav-item"><a href="#partner">合作伙伴</a></div>
      <div class="nav-item"><a href="#phone">联系我们</a></div>
    </div>
  </div>
</template>

<script>
export default {
  name: "siteNav",
  props: {
    componentContent: {
      type: Object,
    },
  },
  computed: {},
  data() {
    return {};
  },
  created() {},
  methods: {
    goAnchor(selector) {/*参数selector是id选择器（#anchor14）*/
      this.$el.querySelector(selector).scrollIntoView()
    },
  },
};
</script>

<style lang="scss" scoped>
.topNav {
  // width: 100%;
  height: 96px;
  // margin: 0px auto;
  padding: 0 96px;
  overflow: hidden;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .logo{
    .logo-img{
      width: 168px;
      height: 48px;
    }
  }
  .nav{
    display: flex;
    .nav-item{
      height: 48px;
      margin-left: 38px;
      padding: 0 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 500;
      letter-spacing: -0.14px;
      line-height: 24px;
      color: rgba(56, 56, 56, 1);
      a{
        text-decoration: none;
        color:#000;
      }
    }
    .login{
      display: flex;
      margin-left: 38px;
      align-items: center;
      padding-left: 6px;
      font-size: 14px;
      font-weight: 500;
      color: rgba(0, 0, 0, 0.56);
      .user{
        margin-left: 14px;
        width: 33px;
        height: 33px;
      }
    }
  }
}

</style>
